﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace YmSoft.Old
{
    [DataContract]
    [MsgVM]
    public class RoomData
    {
        [DataMember]
        byte _Id;

        [MsgVM]
        public byte Id
        {
            get
            {
                return _Id;
            }
            set
            {
                _Id = value;
            }
        }

        [DataMember]
        string _RoomName;

        [MsgVM]
        public string RoomName
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_RoomName))
                {
                    return string.Format("{0}#", this.Id);
                }
                return _RoomName;
            }
            set
            {
                _RoomName = value;
            }
        }

        [DataMember]
        string _RoomGroupName;

        [MsgVM]
        public string RoomGroupName
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_RoomGroupName))
                {
                    return string.Format("无", this.Id);
                }
                return _RoomGroupName;
            }
            set
            {
                _RoomGroupName = value;
            }
        }

        public override string ToString()
        {
            return this.RoomName;
        }


        #region 偏移

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 偏移Id { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 偏移光照 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public Decimal 偏移室内温度1 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public Decimal 偏移室内温度2 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 偏移湿度1 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 偏移湿度2 { get; set; }


        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 偏移P1通风窗位置 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 偏移灌溉加湿 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 偏移P2通风窗位置 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 偏移P1拉幕位置 { get; set; }


        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 偏移P2拉幕位置 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 偏移土壤湿度 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 偏移二氧化碳 { get; set; }


        #endregion

        #region 飘移

        [DataMember]
        [MsgVM]
        [CopyMember]
        public Decimal 飘移室内温度1 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public Decimal 飘移室内温度2 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 飘移湿度1 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 飘移湿度2 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 飘移光照 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 飘移土壤湿度 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public int 飘移二氧化碳 { get; set; }


        #endregion

        [DataMember]
        [MsgVM]
        [CopyMember]
        public bool 启用飘移检测 { get; set; }

        [DataMember]
        [MsgVM]
        [CopyMember]
        public bool IsPhec { get; set; }

    }
}
